﻿Public Class clsGjbMst
    Public Function getAllList(material_code As String) As DataTable
        Dim dt As DataTable = New DataTable
        Dim szSql As String = String.Empty
        szSql &= "SELECT * FROM sf.t_mst_gjb "
        szSql &= " WHERE 1 = 1 "
        If material_code.Length > 0 Then
            szSql &= " and material_code = ? "
            dt = DBacs.ExecuteSql(szSql, -1, material_code)
        Else
            dt = DBacs.ExecuteSql(szSql, -1)
        End If
        Return dt
    End Function

    Public Function selectGjbByVal(mst_val As String) As DataTable
        Dim szSql As String = ""
        szSql &= "select * from sf.t_mst_gjb "
        szSql &= " where mst_value= ? "
        Dim dt As DataTable = DBacs.ExecuteSql(szSql, -1, mst_val)
        If IsNothing(dt) Then
            selectGjbByVal = New DataTable
        Else
            selectGjbByVal = dt
        End If
    End Function

End Class
